﻿using Microsoft.AspNetCore.Authorization;

namespace Service.Core.Identity.Model
{
    /// <summary>
    /// 必要参数类，
    /// 继承 IAuthorizationRequirement，用于设计自定义权限处理器PermissionHandler
    /// 因为AuthorizationHandler 中的泛型参数 TRequirement 必须继承 IAuthorizationRequirement
    /// </summary>
    public class InnerRequirement : IAuthorizationRequirement
    {
        public InnerRequirement(string innerSecretKey = DefaultInnerKeys.InnerKeys)
        {
            InnerSecretKey = innerSecretKey;
        }



        /// <summary>
        /// 内部认证key
        /// </summary>
        public string InnerSecretKey { get; set; }
    }
}
